#!/bin/sh
currDate=`date +%Y-%m-%d`
/opt/lagou/servers/hive-2.3.7/bin/hive -e "use azkaban_test;INSERT INTO TABLE user_info SELECT COUNT(DISTINCT id) active_num, TO_DATE(click_time) dateStr FROM user_clicks WHERE TO_DATE(click_time) = '${currDate}' GROUP BY TO_DATE(click_time);"
echo '数据分析完成！！！'
